package com.xframework.security.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.xframework.annotation.MappingColumn;
import com.xframework.annotation.MappingTable;
import com.xframework.model.BaseModel;

/**
 * 账户角色对应表.
 *
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@MappingTable(tableName = "SECURITY_ACCOUNT_ROLE")
public class AccountRole extends BaseModel {
	/**
	 * 账户id.
	 */
	@MappingColumn(columnName = "ACCOUNT_ID", columnPk = true)
	private String accountId;
	/**
	 * 账户表.
	 */
	@MappingTable(tableName = "SECURITY_ACCOUNT")
	private Account account;
	/**
	 * 角色id.
	 */
	@MappingColumn(columnName = "ROLE_ID", columnPk = true)
	private String roleId;
	/**
	 * 角色表.
	 */
	@MappingTable(tableName = "SECURITY_ROLE")
	private Role role;
	/**
	 * 创建时间.
	 */
	@MappingColumn(columnName = "ACCOUNT_ROLE_CREATE_TIME")
	private String accountRoleCreateTime;

	/**
	 * 获取账户id.
	 * 
	 * @return
	 */
	public String getAccountId() {
		return accountId;
	}

	/**
	 * 获取角色id.
	 * 
	 * @return 角色id
	 */
	public String getRoleId() {
		return roleId;
	}

	/**
	 * 获取创建时间.
	 * 
	 * @return
	 */
	public String getAccountRoleCreateTime() {
		return accountRoleCreateTime;
	}

	/**
	 * 获取账户表.
	 * 
	 * @return 账户表
	 */
	public Account getAccount() {
		return account;
	}

	/**
	 * 获取角色表.
	 * 
	 * @return 角色表
	 */
	public Role getRole() {
		return role;
	}

	/**
	 * 设置账户id.
	 * 
	 * @param accountId
	 *            账户id
	 */
	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	/**
	 * 设置角色id.
	 * 
	 * @param roleId
	 *            角色id
	 */
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	/**
	 * 设置创建时间
	 * 
	 * @param accountRoleCreateTime
	 *            创建时间
	 */
	public void setAccountRoleCreateTime(String accountRoleCreateTime) {
		this.accountRoleCreateTime = accountRoleCreateTime;
	}

	/**
	 * 设置账户表.
	 * 
	 * @param account
	 *            账户表.
	 */
	public void setAccount(Account account) {
		this.account = account;
	}

	/**
	 * 设置角色表.
	 * 
	 * @param role
	 *            角色表
	 */
	public void setRole(Role role) {
		this.role = role;
	}

}
